<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"  
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/templates/StaffTemplateUnauthenticated.xhtml">

    <ui:define name="localization">
        <h:selectOneMenu id="selectedLocale" value="#{indexManagedBean.selectedLocale}">
            <f:selectItems value="#{enumSelectedLocale.listItems}" />

            <p:ajax update="panel
                    emailLabel
                    email
                    submit"
                    listener="#{indexManagedBean.selectedLocaleValueChangeListener}" />
        </h:selectOneMenu>
    </ui:define>

    <ui:define name="content">     

        <p:panel id="panel" header="#{bundle['forgotpassword.label']}" style="margin-bottom:10px;">  
            <p:messages />  
            <h:panelGrid columns="3" cellpadding="5">  
                <h:outputLabel id="usernameLabel" value="#{bundle['password.username.label']}"/>  
                <h:inputText id="username" value="#{staffForgotPasswordManagedBean.username}" required="true" requiredMessage="#{bundle['password.username.required']}"/>
                <p:message for="username"/>

                <h:outputLabel id="birthdateLabel" value ="#{bundle['password.birthdate.label']}"/>
                <p:calendar id="birthdate" value="#{staffForgotPasswordManagedBean.birthdate}" showOn="button" showButtonPanel="true" navigator="true" required="true" requiredMessage="#{bundle['password.birthdate.required']}" pattern="yyyy-MM-dd" />
                <p:message for="birthdate"/>
            </h:panelGrid>
            <br/>
            <h:panelGrid columns="1">
                <h:column>
                    <h:commandLink id="forgot_password" value ="#{bundle['resetpassword.label']}" action="#{pageRedirectorBean.goStaffResetPassword}" immediate="true"/>
                </h:column>
            </h:panelGrid>
            <br/>
            <p:commandButton id="submit" value="#{bundle['forgotpassword.submit.button']}" update="panel" actionListener="#{staffForgotPasswordManagedBean.requestPassword}"/>
        </p:panel>
    </ui:define>
</ui:composition>

